#!/bin/bash


#df -Th | sed '1d' | while read line; do
df -Th | grep "^/dev" | while read line; do
shuzi=$(echo $line | awk '{print $6}' | awk -F% '{print $1}')

   if [ $shuzi -gt 20 ]; then
#     echo "$(echo $line | awk '{print $3,$4,$5,$7}')"
     name=$(echo $line | awk '{print $7}')
     zongrongliang=$(echo $line | awk '{print $3}')
     shengyurongliang=$(echo $line | awk '{print $5}')
     echo "磁盘名称: $name, 总容量: $zongrongliang, 剩余容量: $shengyurongliang"
#    else
#      echo "磁盘容量没有超于20%的" 
    fi
done
